<extend name="Layout/ins_popup" />
<block name="content">
	<div class="popup-frame">
		<input type="hidden" name="ajax" id="ajax" value="1">
		<div class="popup-header">
			<div class="pull-left">
				<h1>导入结果</h1>
			</div>
			<div class="pull-right">
				<a id="btn_close" class="btn btn-cancel">关闭</a>
			</div>
		</div>
		<div class="popup-body">
			<div class="popup-body-scroll">
				<h1>一共导入：{$new_count}</h1>
				<form id="form_password" method="post" action="">
					<input type="hidden" name="ajax" id="ajax" value="1">
					<input type="hidden" name="user_id" id="user_id" value="{$id}">					
					<table class="table">
						<volist name="new_data" id="vo">
							<tr>
								<th class="col-10">{$vo.emp_no}</th>
								<td> {$vo.desc} </td>
							</tr>
						</volist>
					</table>
				</form>
			</div>
		</div>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		var index = parent.layer.getFrameIndex(window.name);
		layui.use('global', function() {
			var $ = layui.jquery;

			//保存后关闭
			$('#btn_save').on('click', function() {
				send_form('form_data', '{:U("save")}', '', function(ret) {
					if (ret.status == 1) {
						parent.layer.msg(ret.info);
						parent.location.reload(true);
					} else {
						layer.msg(ret.info);
						return false;
					}
				});
			});

			//关闭iframe
			$('#btn_close').click(function() {
				parent.layer.close(index);
			});

			$('#btn_select_dept').on('click', function() {
				winopen("{:U('Dept/winpop2')}", 560, 470);
			});
		});

	</script>
</block>